package com.gitee.mars.studyabroad.controller;

import com.gitee.mars.studyabroad.request.StudyAbroadApplicationRequest;
import com.gitee.mars.studyabroad.response.result.R;
import org.springframework.web.bind.annotation.*;
import lombok.AllArgsConstructor;

import java.util.Arrays;

import com.gitee.mars.studyabroad.entity.StudyAbroadApplication;
import com.gitee.mars.studyabroad.service.IStudyAbroadApplicationService;

/**
 * StudyAbroadApplication 控制层
 *
 * @Author wq
 * @Date 2021-04-22
 **/
@RestController
@RequestMapping("/studyAbroadApplication")
@AllArgsConstructor
public class StudyAbroadApplicationController {

    private final IStudyAbroadApplicationService studyAbroadApplicationService;


    @PostMapping("/list")
    public R list(@RequestBody StudyAbroadApplicationRequest request) {
        return R.success(studyAbroadApplicationService.list(request));
    }

    @PostMapping("/add")
    public R add(@RequestBody StudyAbroadApplicationRequest request) {
        studyAbroadApplicationService.add(request);
        return R.success();
    }


}